import request from "@/utils/request";

// 查询部门列表
export function workOrderList(query) {
  return request({
    url: "/pk-retirement/work-order/list",
    method: "get",
    params: query,
  })
}

export function getCommunitySiteSelectOptions() {
  return request({
    url: "/pk-retirement/work-order/get-community-site-select-options",
    method: "get",
  })
}

export function getCommunitySitePersonnelSelectOptions(id) {
  return request({
    url:
      '/pk-retirement/work-order/get-community-site-personnel-select-options/' +
      id,
    method: "get",
  })
}

export function assign(data) {
  return request({
    url: "/pk-retirement/work-order/assign",
    method: "put",
    data: data,
  })
}

export function orderCancel(id) {
  return request({
    url: "/pk-retirement//work-order/cancel/" + id,
    method: "put",
  })
}

export function servicePlanInfo(id) {
  return request({
    url: "/pk-retirement/home-bed-sign/service-plan/info/" + id,
    method: "get",
  })
}

export function getWorkOrderCode() {
  return request({
    url: "/pk-retirement/work-order/get-work-order-code",
    method: "get",
  })
}

export function WorkOrdersave(data) {
  return request({
    url: "/pk-retirement/work-order/save",
    method: "post",
    data: data,
  })
}

export function WorkOrderupdate(data) {
  return request({
    url: "/pk-retirement/work-order/update",
    method: "post",
    data: data,
  })
}

export function WorkOrderInfo(id) {
  return request({
    url: "/pk-retirement/work-order/info/" + id,
    method: "get",
  })
}

export function getHomeBedApplyList() {
  return request({
    url: "/pk-retirement/work-order/get-home-bed-apply-list",
    method: "get",
  })
}

export function listRevisit(query) {
  return request({
    url: "/pk-retirement/work-order/list-revisit",
    method: "get",
    params: query,
  })
}

export function updateRevisitInfo(data) {
  return request({
    url: "/pk-retirement/work-order/update-revisit-info",
    method: "put",
    data: data,
  })
}
